a = int(input())
b = []
i = 2
while i <= (a // 2):
    if a % i == 0:
        b.append(i)
        a = a // i
        i = 2
    else:
        i=i+1
b.append(a)
for i in b[:-1]:
    print(i, end=" ")
print(b[-1])
